This page last changed on Sep 08, 2006 by bowens.

STEP 6: Advanced GeoServer Features

Caching - Tiling your Mapping Client

GeoServer supports caching of requests. This is very useful if you have a tiled WMS client, such as Open Layers. Tiling is what you see on Google Maps. To use caching, you need to do two things. First is put a program called Squid to listen on a certain port. Squid will cache all requests that are directed to the port it is listening on. Second, you need to tell GeoServer to modify the headers on the request results. This is done in the FeatureType editor.

  1. Navigate to the Feature Type editor
  2. Select the layer you want to enable caching on.
  3. Hit the Edit button.
  4. Scroll down until you find the check box labeled Caching Enabled? and make sure it is checked.
  5. Set the Cache time to some large number (in seconds). For example: 86400 (ie. one day)

By default, GeoServer sets the header timeout time of all request results to end immediately. This is so many web map clients will get a new result each time they request something from geoserver. But when you enable caching, the header won't be set to expire for a while, so all other requests just return the result without having to be processed. This makes things very fast.
Take a look at http://sigma.openplans.org to see the caching in action using Open Layers as the client.

SLD Post and Inline Features

Is there an SLD you would like to use that isn't on the server you are retrieving the map from? No problem! With GeoServer you can send an SLD document along with your GetMap Request. With this you can also send your own features to be rendered along with the map. These are called Inline Features. Learn how to do both with this tutorial:
http://docs.codehaus.org/display/GEOSDOC/InLineFeature+Usage

GeoServer's KML/KMZ Output

GeoServer has a fairly advanced KML/KMZ rendering system that fully supports SLD (up to what Google Earth can handle). This tutorial describes in detail how you can limit the features returned, return features back as a raster image instead of XML, and how to turn attribution on and off:
http://docs.codehaus.org/display/GEOSDOC/KML+KMZ+Output

NASA World WInd

If you have World Wind installed, you can follow this tutorial on how to serve data from GeoServer to it:
http://docs.codehaus.org/display/GEOSDOC/NASA+WorldWind

GeoServer Tutorial Page

http://docs.codehaus.org/display/GEOSDOC/Documentation+Tree


Document generated by Confluence on Jan 16, 2008 23:27